<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta action="empadd.php" charset="UTF-8">
        <title>员工信息</title>
        <link href="list.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div id="con">
            
            
            
        <h1>添加员工数据</h1>
        <form action="empadd.php" method="post">
        <table id="si">
                <tr>
                    <th>姓名：</th>
                    <th><input type="text" class="txt" name="e_name"/></th>
                </tr>
                 <tr>
                    <th>所属部门：</th>
                    <th><input type="text" name="e_dept" class="txt"/></th>
                </tr>
                  <tr>
                    <th>头像：</th>
                    <td><input type="radio" name="e_img" value="images/1.jpg" /><img src="images/1.jpg"/>
                        <input type="radio" name="e_img" value="images/2.jpg" /><img src="images/2.jpg"/>
                        <input type="radio" name="e_img" value="images/3.jpg" /><img src="images/3.jpg"/>
                        <input type="radio" name="e_img" value="images/4.jpg" /><img src="images/4.jpg"/>
                    </td>
                </tr>
                 <tr>
                    <th>出生日期：</th>
                    <th><input type="datetime-local" name="date_of_birth"> </th>
                </tr>
                 <tr>
                    <th>入职日期：</th>
                    <th><input type="datetime-local" name="date_of_entry" > </th>
                </tr>
                <tr>
                    <th></th>
                    <td>
                        <input type="reset" value="重置"/>
                        <input type="submit" value="确认"/>
                    </td>
                </tr>
        </table>
      </form>
        
        
         
        <h1>员工信息列表</h1>
        <form action="" method="get" style="margin-left:80px;">
                   <input type="text" placeholder="请输入搜索关键字"  value="<?php echo $search; ?>" name="search"/>
                   <input type='submit' value="搜索" />
               </form>
        <table border="1px" bordercolor="blue" >
            <tr>
                <th>ID</th>
                <th>姓名</th>
                <th>所属部门</th>
                <th>头像</th>
                <th>出生日期</th>
                <th>入职时间</th>
                <th>相关操作</th>
            </tr>
            <?php 
            foreach ($kis as $k) {                 
              ?>
            <tr>
                <th><?php echo $k["e_id"] ?></th>
                <th><?php echo $k["e_name"] ?></th>
                <th><?php echo $k["e_dept"] ?></th>
                <th><img src="<?php echo $k["e_img"] ?>" alt="" /></th>
                <th><?php echo $k["date_of_birth"] ?></th>
                <th><?php echo $k["date_of_entry"] ?></th>
                <th>
                    <a href="javascript:location.href='edis.php?id=<?php echo $k["e_id"]?>'">编辑</a>　
                    <a  href="javascript:"onclick="if(confirm('确定删除吗？')) location.href='del.php?id=<?php echo $k['e_id'] ?>'" >删除</a>
                </th>
                
            </tr>
            <?php  } ?> 
            <tr id="gg">
                   <?php
                       $pre=(($page-1)<=0)?1:($page-1);
                       $next=(($page+1)>$maxpage)?$maxpage:($page+1);                    
                    ?>
                    <th><a href="index.php?page=1">首页</a></th>
                    <th><a href="index.php?page=<?php echo $pre; ?>">上一页</a></th>
                    <th><a href="index.php?page=<?php echo $next; ?>">下一页</a></th>
                    <th class="last"><a href="index.php?page=<?php echo $maxpage; ?>">尾页</a></th>
                    <th>当前<?php echo $page?>页/共<?php echo $maxpage?>页</th>
            </tr>
        </table>
           
        </div>
    </body>
</html>
